//参数柯里化  核心思想是分布传递参数,通过固定某些参数生成一个更专用的函数

function log(level, message) {
  console.log(`[${level}] ${message}`);
}

const logError = log.bind(null, 'ERROR')
const logSuccess = log.bind(null, 'SUCCESS')

logError('File not found')
logSuccess('File is ok')